package org.cresource.product.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.cresource.basic.domain.BaseDomain;

import java.math.BigDecimal;
import java.util.Date;
@Data
public class Product extends BaseDomain {
    private String name;
    //资源路径
    private String resources;
    //商品售价
    private BigDecimal saleprice;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getResources() {
        return resources;
    }

    public void setResources(String resources) {
        this.resources = resources;
    }

    public BigDecimal getSaleprice() {
        return saleprice;
    }

    public void setSaleprice(BigDecimal saleprice) {
        this.saleprice = saleprice;
    }

    public BigDecimal getCostprice() {
        return costprice;
    }

    public void setCostprice(BigDecimal costprice) {
        this.costprice = costprice;
    }

    public Date getOnsaletime() {
        return onsaletime;
    }

    public void setOnsaletime(Date onsaletime) {
        this.onsaletime = onsaletime;
    }

    public Date getOffsaletime() {
        return offsaletime;
    }

    public void setOffsaletime(Date offsaletime) {
        this.offsaletime = offsaletime;
    }

    public Long getState() {
        return state;
    }

    public void setState(Long state) {
        this.state = state;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public Long getSalecount() {
        return salecount;
    }

    public void setSalecount(Long salecount) {
        this.salecount = salecount;
    }

    public ProductDetail getDetail() {
        return detail;
    }

    public void setDetail(ProductDetail detail) {
        this.detail = detail;
    }

    //商品进价
    private BigDecimal costprice;
    private Date onsaletime ;
    private Date offsaletime;
    private Long state;
    @JsonFormat(pattern = "yyyy-MM-dd hh-mm-ss" ,timezone = "GTM+8")
    private Date createtime = new Date();
    private Long salecount = 1122L;
    private ProductDetail detail;
}
